﻿<UserControl x:Class="Studio.DocumentDB.WaitingUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Width="25" Height="25">
    <UserControl.Resources>
        <Style TargetType="Ellipse">
            <Setter Property="Stroke" Value="Blue" />
            <Setter Property="StrokeThickness" Value="3" />
            <Setter Property="StrokeDashArray" Value="1 1.2 1.5 2.3 3" />
        </Style>
    </UserControl.Resources>
    <Canvas Name="mainCanvas" SizeChanged="Canvas_SizeChanged">
        <Canvas.RenderTransform>
            <TransformGroup>
                <RotateTransform x:Name="rotation" CenterX="12.5" CenterY="12.5" />
                <ScaleTransform x:Name="scale" />
            </TransformGroup>
        </Canvas.RenderTransform>
        <Ellipse Name="circle" Width="25" Height="25" />
        <Canvas.Triggers>
            <EventTrigger RoutedEvent="Ellipse.Loaded">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation
                            Storyboard.TargetName="rotation" 
                            Storyboard.TargetProperty="Angle"
                            From="0" To="360" Duration="0:0:4" 
                            RepeatBehavior="Forever" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Canvas.Triggers>
    </Canvas>
</UserControl>
